{% extends 'tend/common/base.html' %}
{% import "tend/macros/_patination.html" as page_macros %}
{% import "tend/macros/_flash.html" as flash_macros %}
{% block title %}
Markdown在线编辑器
{% endblock %}
{% block css %}
{{super()}}
<link rel="stylesheet" href="{{url_for('main.static',filename='js/markdown-editor/css/editormd.min.css')}}"/>
{% endblock %}
{% block main %}
<div class="container">
    <!--面包导航-->
    <nav aria-label="breadcrumb">
        <ol class="breadcrumb bg-white border-0 rounded-6 mb-2 py-2 f-15">
            <li class="breadcrumb-item">
                <i class="fa fa-home mr-1"></i><a href="/">首页</a>
            </li>
            <li class="breadcrumb-item">
                <a href="{{url_for('main.tool.index')}}">工具</a>
            </li>
            <li class="breadcrumb-item active" aria-current="page">
                Markdown编辑器
            </li>
        </ol>
    </nav>
    <!--end-->

    <div id="test-editormd">
        <textarea style="display:none;">
### Disabled options

- TeX (Based on KaTeX);
- Emoji;
- Task lists;

### Code

```python
from yaml import safe_load

with open(filename, 'r') as f:
vars_string = f.read()
base_vars = safe_load(vars_string)
```

    </textarea>
    </div>
</div>

</div>

{% endblock %}

{% block js %}
{{super()}}
<script src="{{url_for('main.static',filename='js/markdown-editor/editormd.min.js')}}"></script>
<script type="text/javascript">
    let testEditor;

    $(function () {
        testEditor = editormd("test-editormd", {
            width: "90%",
            height: 720,
            syncScrolling: "single",
            path: "{{url_for('main.static',filename='js/markdown-editor/lib/')}}"
        });
    });
</script>
{% endblock%}